const SYS_CODE = process.env.SYS_CODE
const { post } = require('./axios')
const host = process.env.LOG_SERVER_HOST_BASE_URL
const reportLog = async (data) => {
  const postData = data
  // 1. 记录请求数据
  try {
    const reqUrl = host + '/v1/log/create'
    await post(reqUrl, postData, {
      'Content-Type': 'application/json',
      Code: SYS_CODE,
    })
  } catch (err) {
    console.log(err, '<<< 记录日志失败')
  }
}
module.exports = {
  reportLog,
}
